﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
using DevExpress.XtraEditors;
using DeviceManager.BusinessLogicLayer;
using DeviceManager.DataAccessLayer;

namespace DeviceManagementIT.Formain.AccountManager
{
    public partial class frmAccountList : DevExpress.XtraEditors.XtraForm
    {
        public frmAccountList()
        {
            InitializeComponent();
        }

        private void sbtnLamtuoi_Click(object sender, EventArgs e)
        {
            UserBllOperation device = new UserBllOperation();
            List<NGUOIDUNG> listdevice = device.GetRecordUser(new NGUOIDUNG());
            gridControl1.DataSource = listdevice;

            gridView1.Columns[1].Caption = "Tài khoản";
            gridView1.Columns[4].Caption = "Quyền";
            gridView1.Columns[5].Caption = "Trạng thái";
            gridView1.Columns[0].Visible = false;
            gridView1.Columns[2].Visible = false;
            gridView1.Columns[6].Visible = false;
        }

        private void dbtnThemMoi_Click(object sender, EventArgs e)
        {
            frmAddAccount m_frmAddAccount = new frmAddAccount();
            m_frmAddAccount.Show();
        }

        private void frmAccountList_Load(object sender, EventArgs e)
        {
            sbtnLamtuoi.PerformClick();
        }
    }
}